package com.tbvtc.agriculturalcreditchainserver2025.mapper;

import com.tbvtc.agriculturalcreditchainserver2025.entity.Crop;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author shiyuhao
 * @since 2025-03-25
 */
@Mapper
public interface CropMapper extends BaseMapper<Crop> {
  @Select("select price from crop where phon#{phone}")
  String selectPriceByPhone(String phoen);
  @Update("update crop set is_pest = 1  where id = #{id}")
  void updatePest(Integer id);
  @Update("update crop set is_pest = 0  where name = #{name}")
  void cancelPest(String name);
}
